#pragma once
#include "cv.h"
#include "highgui.h"
#include <string>
#include "ClassificationName.h"
	class CTruthDataPoint
	{
	public:
		CTruthDataPoint( void );
		CTruthDataPoint( std::string source_file, std::string dest_file, double classification, CvSize sz, CvPoint pt );
		CTruthDataPoint( std::string file ); 
		virtual ~CTruthDataPoint( void );
		CTruthDataPoint( const CTruthDataPoint& other ); 
		CTruthDataPoint& operator= (const CTruthDataPoint& other);
		virtual bool ReadFromLine( std::string line );
		virtual std::string PrintToLine( void );
		bool LoadSourceImage( void );
		bool FreeSourceImage( void );
		bool HasImage( void );
		IplImage * GetImage( void );
		void SetImage( IplImage * img  ); 
		bool SaveImage( std::string fname );
		bool SaveImage( void );
		void FreeImage( void );

		std::string GetInFile( void );
		void SetInFile( std::string fname );
		
		std::string GetOutFile( void );
		void SetOutFile( std::string fname);

/*		std::string GetClassAsString( void );
		void SetClassAsString( std::string classification );

		double GetClassAsDouble( void );
		void SetClassAsDouble( double class );*/
		CClassificationName& GetClassification( void ){return m_classification;}; 

		CvSize GetSize( void );
		void SetSize( CvSize sz );
		void SetSize( int w, int h);

		CvPoint GetPoint( void );
		void SetPoint( CvPoint pt );
		void SetPoint( int x, int y ); 

		std::string Print( void );

		void SetTR( int x, int y ){m_TR.x=x; m_TR.y=y;};
		CvPoint GetTR( void ){return(m_TR);};
		void SetBL( int x, int y ){m_BL.x=x; m_BL.y=y;};
		CvPoint GetBL( void ){return(m_BL);};

	protected:
		std::string m_inFileName;
		std::string m_outFileName;
		CClassificationName m_classification; 
		//std::string m_class;
		//double m_dClass; 
		CvSize m_size;
		CvPoint m_center;
		CvPoint m_TR;
		CvPoint m_BL;
		IplImage * m_img; 
	};
